Skip to content

feat(admission): add NvFractions request validation foundation - #2040

Open
davidLif wants to merge 1 commit into
mainfrom
codex/nvfractions-foundation
Open

feat(admission): add NvFractions request validation foundation#2040
davidLif wants to merge 1 commit into
mainfrom
codex/nvfractions-foundation

Conversation

@davidLif

Copy link
Copy Markdown
Collaborator

Description

Stack PR 1/9 for GPU sharing migration.

Base: main
Head: codex/nvfractions-foundation

This adds the common NvFractions request parsing and validation foundation used by later scheduler, binder, and admission changes. It introduces shared constants, GPU sharing resource helpers, validation helpers, and admission validation coverage for NvFractions-style GPU memory requests.

Related Issues

N/A

Checklist

Note: Ensure your PR title follows the Conventional Commits format (e.g., feat(scheduler): add new feature)

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)
  • Added a changelog fragment via make changelog (or applied the skip-changelog label). Do not edit CHANGELOG.md directly — pending fragments are folded into it at release time.

Breaking Changes

None.

Additional Notes

Validation run:

go test ./pkg/common/resources ./pkg/admission/webhook/v1alpha2/gpusharing

@davidLif
davidLif force-pushed the codex/nvfractions-foundation branch from 25c063d to 32d175d Compare August 10, 2026 10:02
@davidLif
davidLif changed the base branch from main to codex/fix-reservation-bindrequest-cache-lag August 10, 2026 10:03
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Total coverage: 54.6% -> 54.7% (delta 0.10%)

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/admission/webhook/v1alpha2/gpusharing 87.10% (-2.90%) 👎
github.com/kai-scheduler/KAI-scheduler/pkg/common/constants 0.00% (ø)
github.com/kai-scheduler/KAI-scheduler/pkg/common/resources 64.83% (+8.19%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/kai-scheduler/KAI-scheduler/pkg/admission/webhook/v1alpha2/gpusharing/gpu_sharing.go 87.10% (-2.90%) 31 (+11) 27 (+9) 4 (+2) 👎
github.com/kai-scheduler/KAI-scheduler/pkg/common/constants/constants.go 0.00% (ø) 2 0 2
github.com/kai-scheduler/KAI-scheduler/pkg/common/resources/gpu_sharing.go 78.26% (+78.26%) 92 (+39) 72 (+72) 20 (-33) 🌟
github.com/kai-scheduler/KAI-scheduler/pkg/common/resources/gpu_sharing_nvfractions.go 95.24% (+95.24%) 42 (+42) 40 (+40) 2 (+2) 🌟
github.com/kai-scheduler/KAI-scheduler/pkg/common/resources/gpu_sharing_validation.go 0.00% (ø) 67 (+67) 0 67 (+67)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/kai-scheduler/KAI-scheduler/pkg/admission/webhook/v1alpha2/gpusharing/gpu_sharing_test.go
  • github.com/kai-scheduler/KAI-scheduler/pkg/common/resources/gpu_sharing_nvfractions_test.go
  • github.com/kai-scheduler/KAI-scheduler/pkg/common/resources/gpu_sharing_test.go

@davidLif
davidLif force-pushed the codex/nvfractions-foundation branch from 32d175d to 6e7a222 Compare August 11, 2026 13:46
@davidLif
davidLif changed the base branch from codex/fix-reservation-bindrequest-cache-lag to main August 11, 2026 13:46
@davidLif
davidLif force-pushed the codex/nvfractions-foundation branch from 6e7a222 to 965c684 Compare August 11, 2026 13:48
@davidLif
davidLif marked this pull request as ready for review August 11, 2026 13:52
@davidLif
davidLif force-pushed the codex/nvfractions-foundation branch 2 times, most recently from 0931678 to 7789c35 Compare August 17, 2026 06:39
Signed-off-by: davidLif <davidshani12@gmail.com>
@davidLif
davidLif force-pushed the codex/nvfractions-foundation branch from 7789c35 to e8dedaf Compare August 17, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant